<?php

class Base_model
{
	var $db;
	
	function __construct()
	{
		$this->db = Base_controller::get_instance()->db;
	}
	
	function to_array()
	{
		$array = (array) $this;
		
		unset($array['db']);
		
		return $array;
	}
	
}

?>